;options results;signal on syntax;dbfile='Kuang11/kuang11GUI.debug';signal on halt;if ~show('P','KUANG') then;do;call pragma(S,20000);address command 'run <>NIL: sys:rexxc/muirexx rexx/kuang11gui.amirx port KUANG HELP Kuang_Eleven.guide';exit;end;address KUANG;call init();MUIA_Cycle_Active=0x80421788;MUIM_Notify=0x8042c9cb;MUIM_Set=0x8042549a;MUIM_NoNotifySet=0x8042216f;MUIM_Application_AboutMUI=0x8042d21d;MUIM_Application_OpenConfigWindow=0x804299ba;MUIA_Selected=0x8042654b;MUIA_Slider_Level=0x8042ae3a;Selected=0x8042654b;Slider_Level=0x8042ae3a;Slider_Max=0x8042d78a;Slider_Min=0x8042e404;Application_AboutMUI=0x8042d21d;Application_OpenConfigWindow=0x804299ba;MUIA_Menuitem_Title=0x804218be;Menuitem_Shortcut=0x80422030;MUIA_List_Active=0x8042391c;MUIA_List_AutoVisible=0x8042a445;MUIA_List_AdjustHeight=0x8042850d;MUIA_List_Format=0x80423c0a;MUIA_Window_Activate=0x80428d2f;MUIA_Window_PublicScreen=0x804278e4;MUIA_Application_HelpFile=0x804293f4;MUIV_List_Insert_Bottom=-3;List_InsertSingle=0x804254d5;Listview_DragType_Immediate=1;Listview_MultiSelect_Shifted=2;List_GetEntry_Active=-1;List_Insert_Active=-1;List_Insert_Bottom=-3;Listview_DragType=0x80425cd3;Listview_MultiSelect=0x80427e08;List_DragSortable=0x80426099;List_ShowDropMarks=0x8042c6f3;Draggable=0x80420b6e;Dropable=0x8042fbce;Group_Columns=0x8042f416;Weight=0x80421d1f;TRUE=1;FALSE=0;window ID KWIN TITLE '"Kuang Eleven v3.0"'COMMAND "endprog()" PORT KUANGPORT;MENU LABEL "Project";ITEM COMMAND "about()" PORT KUANGPORT ATTRS Menuitem_Shortcut '?' LABEL "About Kuang11...";item ATTRS MUIA_Menuitem_Title '-1';item COMMAND '"method 'MUIM_Application_AboutMUI' 0"' PORT KUANG LABEL "About MUI";item COMMAND '"method 'MUIM_Application_OpenConfigWindow'"' PORT KUANG ATTRS Menuitem_Shortcut 'M' LABEL "MUI...";item ATTRS MUIA_Menuitem_Title '-1';ITEM COMMAND "endprog()" PORT KUANGPORT ATTRS Menuitem_Shortcut 'Q' LABEL 'Quit';ENDMENU;GROUP REGISTER LABELS 'Channel,Flood,Misc,CTCP,Friends,K¹¹ Plugins';GROUP REGISTER LABELS 'Protection,Lists';GROUP;GROUP HORIZ;GROUP HORIZ frame LABEL 'Master';LABEL SINGLE 'Channel Protection:';CHECK PORT KUANGPORT conv('prot') COMMAND 'setc("prot",%s)'HELP '"Master toggle for channel protection."';ENDGROUP;GROUP frame LABEL 'Misc';group HORIZ;LABEL SINGLE 'NetHack:';CHECK conv('nhp') COMMAND 'setc("nhp",%s)' PORT KUANGPORT HELP '"Users who join from a split and get\nopped by the server will be deopped.\nIgnores users with o flag in userlist."';LABEL SINGLE 'ScrewBan:';CHECK conv('sban') COMMAND 'setc("sban",%s)' PORT KUANGPORT HELP '"Remove all ScrewBans."';endgroup;ENDGROUP;ENDGROUP;GROUP FRAME HORIZ LABEL 'MassModes Protection';GROUP;LABEL SINGLE 'MassDeop:';LABEL SINGLE 'MassOp:';ENDGROUP;GROUP;CHECK conv('mdeop') COMMAND 'setc("mdeop",%s)' PORT KUANGPORT HELP '"Protect from MassDeop."';CHECK conv('mop') COMMAND 'setc("mop",%s)' PORT KUANGPORT HELP '"Protect from MassOp."';ENDGROUP;GROUP;LABEL SINGLE 'MassBan:';LABEL SINGLE 'MassUnBan:';ENDGROUP;GROUP;CHECK conv('mban') COMMAND 'setc("mban",%s)' PORT KUANGPORT HELP '"Protect from MassBan."';CHECK conv('muban') COMMAND 'setc("muban",%s)' PORT KUANGPORT HELP '"Protect from MassUnBan."';ENDGROUP;LABEL SINGLE 'Sensor:';SLIDER ATTRS Slider_Min 3 Slider_Max 10 Slider_Level getclip('sc_sensormode') COMMAND 'setclip("sc_sensormode",%s)' PORT KUANGPORT HELP '"Number of modes to trigger MassModes protection.\nSee also flood reset delay."';ENDGROUP;GROUP HORIZ frame LABEL 'MassKick';GROUP HORIZ;LABEL SINGLE 'Protect:';CHECK conv('mkick') COMMAND 'setc("mkick",%s)' PORT KUANGPORT HELP '"Protect from MassKick."';ENDGROUP;LABEL SINGLE 'Sensor:';SLIDER ATTRS Slider_Min 3 Slider_Max 10 Slider_Level getclip('sc_sensorkick') COMMAND 'setclip("sc_sensorkick",%s)' PORT KUANGPORT HELP '"Number of kicks to trigger MassKick protection.\nSee also flood reset delay."';ENDGROUP;GROUP HORIZ frame LABEL 'MassJoin';GROUP HORIZ;LABEL SINGLE 'Protect:';CHECK conv('mjoin') COMMAND 'setc("mjoin",%s)' PORT KUANGPORT HELP '"Protect from MassJoin."';ENDGROUP;LABEL SINGLE 'Sensor:';SLIDER ATTRS Slider_Min 2 Slider_Max 10 Slider_Level getclip('sc_sensorjoin') COMMAND 'setclip("sc_sensorjoin",%s)' PORT KUANGPORT HELP '"Number of joins to trigger MassJoin protection.\nSee also flood reset delay."';ENDGROUP;ENDGROUP;GROUP;GROUP FRAME LABEL 'AutoChannels';LIST ID ACLST HELP '"Channels in which Kuang works.\nTo Enable all channels enter ALL and Remove all other entries."';GROUP HORIZ;LABEL SINGLE 'Add:';string COMMAND 'addlist(ACLST,"%s","autochannels")' PORT KUANGPORT HELP '"Enter a Channel to add.\nALL for all channels."';BUTTON COMMAND 'dellist(ACLST,"autochannels")' PORT KUANGPORT HELP '"Remove the entry selected in the list."' LABEL 'Remove';ENDGROUP;ENDGROUP;GROUP FRAME LABEL 'Bitch';GROUP HORIZ;LABEL SINGLE 'Bitch mode:';cycle cyconv("deop") PORT KUANGPORT HELP '"Toggle Bitch Mode:\nOn - Only you can give Ops.\nFriends - Only your o flagged friends can give Ops."' LABELS 'Off,On,Friends';ENDGROUP;LIST ID BCLST HELP '"Channels in which bitch mode works.\nTo Enable all channels enter ALL and Remove all other entries."';GROUP HORIZ;LABEL SINGLE 'Add:';string COMMAND 'addlist(BCLST,"%s","deopc")' PORT KUANGPORT HELP '"Enter a Channel to add.\nALL for all channels."';BUTTON COMMAND 'dellist(BCLST,"deopc")' PORT KUANGPORT HELP '"Remove the entry selected in the list."' LABEL 'Remove';ENDGROUP;ENDGROUP;ENDGROUP;ENDGROUP;GROUP;GROUP HORIZ;GROUP HORIZ FRAME LABEL 'Protection Modes';GROUP;LABEL SINGLE 'Flood Protection:';LABEL SINGLE 'FloodNet:';ENDGROUP;group;CHECK PORT KUANGPORT conv('floodp') COMMAND 'setc("floodp",%s)' HELP '"Master toggle for Flood Protection"';CHECK conv('floodnet') COMMAND 'setc("floodnet",%s)' PORT KUANGPORT HELP '"FloodNet Protection.\nChecks for flood attacks from\nmultiple hosts.\nWarning: do not activate this with XDCC."';endgroup;SPACE;SPACE;ENDGROUP;GROUP HORIZ FRAME LABEL 'Replys';LABEL DOUBLE 'Flood Reply:';STRING COMMAND 'setclip("sc_floodmsg","%s")' PORT KUANGPORTHELP '"This text will be replied to Flooders."'CONTENT getclip('sc_floodmsg');ENDGROUP;ENDGROUP;GROUP HORIZ FRAME LABEL 'Sensors';GROUP;LABEL DOUBLE CENTER 'Reset Delay:';LABEL DOUBLE CENTER 'Message:';LABEL DOUBLE CENTER 'Notice:';LABEL DOUBLE CENTER 'Invite:';LABEL DOUBLE CENTER 'CTCP:';LABEL DOUBLE CENTER 'DCC:';ENDGROUP;GROUP;SLIDER ATTRS Slider_Min 1 Slider_Max 10 Slider_Level getclip('sc_resetcount') COMMAND 'setclip("sc_resetcount",%s)' PORT KUANGPORT HELP '"Interval between floods in seconds."';SLIDER ATTRS Slider_Min 1 Slider_Max 20 Slider_Level getclip('sc_sensorprivmsg') COMMAND 'setclip("sc_sensorprivmsg",%s)' PORT KUANGPORT HELP '"The number of messages that causes ignore.\nOnly LONG messages are considered!"';SLIDER ATTRS Slider_Min 1 Slider_Max 20 Slider_Level getclip('sc_sensornotice') COMMAND 'setclip("sc_sensornotice",%s)' PORT KUANGPORT HELP '"The number of notices that causes ignore.\nOnly LONG notices are considered!"';SLIDER ATTRS Slider_Min 1 Slider_Max 20 Slider_Level getclip('sc_sensorinvite') COMMAND 'setclip("sc_sensorinvite",%s)' PORT KUANGPORT HELP '"The number of invites that causes ignore."';SLIDER ATTRS Slider_Min 1 Slider_Max 10 Slider_Level getclip('sc_sensorctcp') COMMAND 'setclip("sc_sensorctcp",%s)' PORT KUANGPORT HELP '"The number of CTCPs that causes ignore."';SLIDER ATTRS Slider_Min 1 Slider_Max 20 Slider_Level getclip('sc_sensordcc') COMMAND 'setclip("sc_sensordcc",%s)' PORT KUANGPORT HELP '"The number of DCCs that causes ignore."';ENDGROUP;ENDGROUP;GROUP HORIZ FRAME LABEL 'Ignore';LABEL DOUBLE 'Ignore TimeOut:';SLIDER ATTRS Slider_Min 1 Slider_Max 10 Slider_Level getclip('sc_ig_count') COMMAND 'setclip("sc_ig_count",%s)' PORT KUANGPORT HELP '"Time to ignore flooder in minuets."';ENDGROUP;ENDGROUP;GROUP;GROUP FRAME LABEL "AutoModes";group horiz;LABEL SINGLE 'DCC AutoGet:';cycle cyconv("autoget") COMMAND 'setc("autoget",%s)' PORT KUANGPORTHELP '"DCC Autoget function:\nAll - Accept from all (Not reccomended).\nFriends - Accept from friends with a flag.\nAllFriends - Accept from all friends in the userlist."'LABELS 'Off,All,Friends,AllFriends';SPACE HORIZ;LABEL SINGLE 'Query Windows';CHECK conv('query') COMMAND 'setc("query",%s)' PORT KUANGPORT HELP '"Auto Open Query Qindows on DCC chat."';endgroup;group horiz;space horiz;LABEL SINGLE 'Invite AutoJoin:';cycle cyconv("autojoin")COMMAND 'setc("autojoin",%s)' PORT KUANGPORTHELP '"AutoJoin on invite function:\nAll - Accept from all (Not reccomended)\nFriends - Accept from friends with i flag."'LABELS 'Off,All,Friends';endgroup;ENDGROUP;GROUP HORIZ FRAME LABEL "Sound";LABEL SINGLE 'AutoSend:';CHECK conv('asound') COMMAND '"SAY /KC ASND"' PORT amirc HELP '"AutoSend sounds."';SPACE HORIZ;LABEL SINGLE 'AutoMove:';CHECK conv('amsound') COMMAND 'setc("amsound",%s)' PORT KUANGPORT HELP '"Auto Move #?.WAV and #?.SND to AmIRC sounddir."';SPACE HORIZ;LABEL SINGLE 'Play Events:';CHECK conv('playsounds') COMMAND 'setc("playsounds",%s)' PORT KUANGPORT HELP '"Play sounds on K¹¹ Events."';ENDGROUP;GROUP FRAME LABEL 'Away';GROUP HORIZ;LABEL SINGLE 'Log:';CHECK conv('log') COMMAND 'setc("log",%s)' PORT KUANGPORT HELP '"Log Messages."';SPACE HORIZ;LABEL SINGLE 'Hilite Log:';CHECK conv('hlog') COMMAND 'setc("hlog",%s)' PORT KUANGPORT HELP '"Log Hilites.\nIt is usefull to add your nick as a hilite\nentry and thus Kuang will log every message which\n mentions your name."';SPACE HORIZ;LABEL SINGLE 'DCC Chat Log:';CHECK conv('dcclog') COMMAND 'setc("dcclog",%s)' PORT KUANGPORT HELP '"Log Messages recived in a DCC Chat."';ENDGROUP;GROUP HORIZ;LABEL SINGLE 'Away Msgs:';cycle cyconv('awaytxt')COMMAND 'setc("awaytxt",%s)' PORT KUANGPORTHELP '"Display away messages to all channels\nText - Status of log,pager and away reason.\nSound - Will play Away.wav and Back.wav"'LABELS 'Off,Text,Sound,Both';SPACE HORIZ;LABEL SINGLE 'Verbose:';CHECK conv('awayverb') COMMAND 'setc("awayverb",%s)' PORT KUANGPORT HELP '"Include Status of Message logger and Pager in the away message."';ENDGROUP;GROUP HORIZ;LABEL SINGLE 'Auto Iconify:';CHECK conv('aicon') COMMAND 'setc("aicon",%s)' PORT KUANGPORT HELP '"Auto Iconify on /Away."';LABEL SINGLE 'Away Nick';STRING COMMAND 'setclip("sc_awaynick","%s")' PORT KUANGPORT HELP '"Change to this nick when you are marked away.\nSet to an empty string to disable feature."' CONTENT getclip('sc_awaynick');ENDGROUP;ENDGROUP;GROUP FRAME LABEL 'KickWords';GROUP HORIZ;GROUP HORIZ;LABEL SINGLE 'KickWords:';CHECK conv('shit') COMMAND '"SAY /KC SHIT"' PORT amirc HELP '"Toggle KickWords function.\nSomeone who says these words will be Kicked."';LABEL SINGLE 'Ban:';CHECK conv("bankickwords") COMMAND 'setc("bankickwords",%s)' PORT KUANGPORT HELP '"Toggle Ban on KickWords."';ENDGROUP;LABEL SINGLE 'Sensor';SLIDER ATTRS Slider_Min 1 Slider_Max 10 Slider_Level getclip('sc_maxword') COMMAND 'setclip("sc_maxword",%s)' PORT KUANGPORT HELP '"Ban people who say this number of KickWords."';ENDGROUP;LIST ID KCLST HELP '"List of kickwords."';GROUP HORIZ;LABEL SINGLE 'Add:';string COMMAND 'addlist(KCLST,"%s","swords")' PORT KUANGPORT HELP '"Enter a KickWord to add."';BUTTON COMMAND 'dellist(KCLST,"swords")' PORT KUANGPORT HELP '"Remove the entry selected in the list."' LABEL 'Remove';ENDGROUP;ENDGROUP;ENDGROUP;GROUP;GROUP FRAME LABEL 'Extended CTCP';GROUP HORIZ;LABEL SINGLE 'Extended:';CHECK conv('ctcpauto') COMMAND 'setc("ctcpauto",%s)' PORT KUANGPORT HELP '"Extended CTCP toggle."';SPACE HORIZ;LABEL SINGLE 'Pager:';cycle cyconv("page") COMMAND 'setc("page",%s)' PORT KUANGPORTHELP '"Pager function:\nOn - Everyone may page\nFriends - Only friends may page"'LABELS 'Off,On,Friends';ENDGROUP;GROUP HORIZ;LABEL SINGLE 'Ident:';CHECK conv('ctcpident') COMMAND 'setc("ctcpident",%s)' PORT KUANGPORT HELP '"Enable CTCP Ident command to allow users on the friends list\nto remotely add hostmasks with password authentication."';LABEL SINGLE 'Password:';STRING COMMAND 'setclip("sc_password","%s")' PORT KUANGPORTHELP '"Password for remote authenitaction with /CTCP IDENT.\nEmpty string disables."'CONTENT getclip('sc_password');ENDGROUP;ENDGROUP;GROUP HORIZ frame LABEL XDCC;GROUP HORIZ;LABEL SINGLE 'XDCC:';CHECK conv('xdcc') COMMAND 'setc("xdcc",%s)' PORT KUANGPORT HELP '"Toggle XDCC."';ENDGROUP;SPACE BAR;GROUP;GROUP HORIZ;LABEL SINGLE 'Sec:';cycle cyconv("xdccsec")COMMAND 'setc("xdccsec",%s)' PORT KUANGPORTHELP '"XDCC Security :\nAll - All Packs require user to have x flag.\nPacks - Security is packs dependant ie each pack has its security setting.\nOps - Secured packs require ops."'LABELS 'Off,All,Packs,Ops';LABEL SINGLE 'Style:';cycle cyconv("xdccstyle")COMMAND 'setc("xdccstyle",%s)' PORT KUANGPORTHELP '"XDCC Style :\nShort : Venom Style.\nLong : Long style,not suitable for many packs."'LABELS 'Short,Long';ENDGROUP;GROUP HORIZ;LABEL SINGLE 'ANSI:';CHECK conv("xdccbold") COMMAND 'setc("xdccbold",%s)' PORT KUANGPORT HELP '"Display Bold/Underline styles."';LABEL SINGLE 'Rates:';CHECK conv("xdccrates") COMMAND 'setc("xdccrates",%s)' PORT KUANGPORT HELP '"Display XDCC Rates."';LABEL SINGLE 'Kick:';CHECK conv('xdcckick') COMMAND 'setc("xdcckick",%s)' PORT KUANGPORT HELP '"Toggle XDCC Kick on unregistered requests."';LABEL SINGLE 'Mass Kick:';CHECK conv('xdcc_masskick') COMMAND 'setc("xdcc_masskick",%s)' PORT KUANGPORT HELP '"Toggle Mass XDCC Kick.\nKicks people who XDCC LIST the whole channel."';ENDGROUP;GROUP HORIZ;LABEL SINGLE 'Anti-Leech:';CYCLE cyconv("xdccleech")COMMAND 'setc("xdccleech",%s)' PORT KUANGPORTHELP '"Toggle Anti-Leech.\nUsers will be allowed to get one pack at a time.\nAll - Affects all users.\nFriends Affects all users except those in the friends list with x flag.\nAllFriends - Affects only people who are not in the friends list."'LABELS 'Off,All,Friends,AllFriends';LABEL SINGLE 'Slots:';SLIDER ATTRS Slider_Min 1 Slider_Max 30 Slider_Level getclip('sc_xdccslots') COMMAND 'setclip("sc_xdccslots",%s)' PORT KUANGPORT HELP '"Number of Slots."';ENDGROUP;GROUP HORIZ;SPACE;LABEL SINGLE 'Send list in file:';CHECK conv("xdcc_send_filelist")COMMAND 'setc("xdcc_send_filelist",%s)' PORT KUANGPORTHELP '"Toggle XDCC Server sending list in file instead of message.\nThis is included for servers that trigger excess flood on a large number of packs.\nThe list file will be displayed on the remote client if Kuang Eleven 3 is installed."'SPACE;ENDGROUP;ENDGROUP;ENDGROUP;ENDGROUP;GROUP;GROUP FRAME LABEL 'AutoOp';GROUP HORIZ;LABEL SINGLE 'AutoOp:';CHECK conv('autop') COMMAND 'setc("autop",%s)' PORT KUANGPORT HELP '"AutoOp friends with o flag on join/deop."';SPACE HORIZ;LABEL SINGLE 'Required flags:';STRING COMMAND 'setc("autopf",%s)' PORT KUANGPORT HELP '"Required flags to give Autops.\nDefaults to o."' CONTENT getclip('sc_autopf');ENDGROUP;GROUP HORIZ;LABEL CENTER 'Delay:';SLIDER ATTRS Slider_Min 0 Slider_Max 15 Slider_Level getclip('sc_autopdel') COMMAND 'setclip("sc_autopdel",%s)' PORT KUANGPORT HELP '"The delay when autopping a user that joins the channel.\nEnter 0 to disable this and give ops immidiatly."';LABEL SINGLE 'Random delayed:';CHECK conv('randel') COMMAND 'setc("randel",%s)' PORT KUANGPORT HELP '"Computes a random delay for AutoOps\nfrom the op delay."';ENDGROUP;ENDGROUP;GROUP HORIZ FRAME LABEL 'Protection';LABEL DOUBLE 'Friends Protection:';CHECK conv('fprot') COMMAND 'setc("fprot",%s)' PORT KUANGPORT HELP '"Protect friends from deop/ban/kick(see Revenge)."';SPACE HORIZ;LABEL DOUBLE 'Self-Protection:';CHECK conv('saveban') COMMAND 'setc("saveban",%s)' PORT KUANGPORT HELP '"Enabled : Ban on you will be cause quick deop/ban/kick on the lamer.\nDisabled - Bans on you removed."';ENDGROUP;GROUP FRAME LABEL "Revenge";GROUP HORIZ;SPACE HORIZ;LABEL SINGLE 'Revenge on:';cycle cyconv("rvg")COMMAND 'setc("rvg",%s)' PORT KUANGPORTHELP '"Revenge kicks people who hurt friends with p flag:\nOn - Kick Everyone.\nNon-Protected - Kick only people without p flag."'LABELS 'Off,On,UnProtected';SPACE HORIZ;ENDGROUP;GROUP HORIZ;LABEL SINGLE 'Deop:';CHECK conv('rvgd') COMMAND 'setc("rvgd",%s)' PORT KUANGPORT HELP '"Toggles Deopping when revenge is working"';SPACE HORIZ;LABEL SINGLE 'Ban:';CHECK conv('rvgb') COMMAND 'setc("rvgb",%s)' PORT KUANGPORT HELP '"Toggles Banning when revenge is working"';SPACE HORIZ;LABEL SINGLE 'Kick:';CHECK conv('rvgk') COMMAND 'setc("rvgk",%s)' PORT KUANGPORT HELP '"Toggles Kicking when revenge is working"';ENDGROUP;GROUP HORIZ;LABEL SINGLE 'Kick String:';STRING COMMAND 'setclip("sc_pkickmsg","%s")' PORT KUANGPORTHELP '"Kick Reason When protecting friends.\n%N will be replaced with the users nick."'CONTENT getclip('sc_pkickmsg');ENDGROUP;ENDGROUP;GROUP HORIZ FRAME LABEL 'Channel Commands';LABEL SINGLE 'Command Prefix:';STRING COMMAND '"say /kc comp %s"' PORT AMIRC HELP '"The command prefix for remote channel commands"' CONTENT getclip('sc_comprefix');ENDGROUP;ENDGROUP;GROUP;GROUP FRAME LABEL 'CTCP';LIST ID EXLST TITLE '"\033bCommand,\033bScript"' ATTRS MUIA_List_Format '"MIW=25 P=\033c BAR,MIW=50 P=\033c"'HELP '"List of CTCP commands that will launch external script."';GROUP HORIZ;LABEL SINGLE 'Command:';STRING ID EXCMD HELP '"Enter a CTCP command."';LABEL SINGLE 'Script:';POPLIST ID EXSCR COMMAND 'setfile("%s",poplist,EXSCR,"Rexx/CTCP")' PORT KUANGPORTHELP '"Enter a script.\n.amirx suffix is not required.\nScript must be in the amirc rexx directory."'LABELS getdir('Rexx/CTCP');ENDGROUP;GROUP HORIZ;button COMMAND 'insext(EXLST,string,EXCMD,poplist,EXSCR,"extrctcp","extrscr","Rexx/CTCP")' PORT KUANGPORTHELP '"Add the entry to list of plugins."' LABEL 'Add';button COMMAND 'delext(EXLST,"extrctcp","extrscr")' PORT KUANGPORTHELP '"Delete the entry from list of plugins."' LABEL 'Delete';endgroup;endgroup;group FRAME Label 'Public';list id PBLST TITLE '"\033bCommand,\033bScript"' ATTRS MUIA_List_Format '"MIW=25 P=\033c BAR,MIW=50 P=\033c"'HELP '"List of public commands that will launch external script."';group HORIZ;label SINGLE 'Command:';string ID PBCMDHELP '"Enter a public command.\nThe command prefix is NOT required."';label SINGLE 'Script:';poplist ID PBSCR COMMAND 'setfile("%s",PBSCR,"Rexx/Pub")' PORT KUANGPORTHELP '"Enter a script.\n.amirx suffix is not required.\nScript must be in the amirc rexx/pub directory."'LABELS getdir('Rexx/Pub');endgroup;group HORIZ;button COMMAND 'insext(PBLST,string,PBCMD,poplist,PBSCR,"pubcmd","pubscr","Rexx/Pub")' PORT KUANGPORTHELP '"Add the entry to list of plugins."' LABEL 'Add';button COMMAND 'delext(PBLST,"pubcmd","pubscr")' PORT KUANGPORTHELP '"Delete the entry from list of plugins."' LABEL 'Delete';endgroup;endgroup;endgroup;endgroup;group HORIZ;button ID CANCL COMMAND 'load()' PORT KUANGPORT HELP '"Reload configuration from disk then exit."' LABEL 'Reload';space;button ID SAVE COMMAND '"SAY /SAVE"' PORT amirc HELP '"Save configuration to disk then exit."' LABEL 'Save';endgroup;endwindow;call fillist('swords',KCLST);call fillist('autochannels',ACLST);call fillist('deopc',BCLST);call fillelist('EXLST','extrctcp','extrscr');call fillelist('PBLST','pubcmd','pubscr');address REXX;myport='KUANGPORT';oport=openport(myport);do forever;do until waitpkt(myport);call delay(20);end;packet=getpkt(myport);if packet ~=null() then;do;cmd='call' getarg(Packet);call reply(Packet,0);interpret cmd;end;end;exit;insext:;idl=arg(1);idc=arg(2) 'ID' arg(3);ids=arg(4) 'ID' arg(5);ccmd='sc_'arg(6);cscr='sc_'arg(7);address KUANG idc;cmd=upper(result);address KUANG ids;cpat=result;if arg(8)~='' then call setfile(cpat,arg(4),arg(5),arg(8));else call isdir(cpat,arg(5));address KUANG ids;scr=strip(result,'B',' ');if cmd=''|scr='' then return 0;x=getclip(ccmd);if x='' then address KUANG LIST ID idl POS MUIV_List_Insert_Bottom STRING;address KUANG LIST ID idl INSERT POS MUIV_List_Insert_Bottom STRING cmd','scr;address KUANG idc CONTENT;address KUANG ids CONTENT;if words(scr)>1 then scr=''scr'';call setclip(ccmd,strip(x cmd));call setclip(cscr,strip(getclip(cscr) scr));return 0;isdir:;if arg(1)='' then return 0;poppath=absolutepath(arg(1));Select;when ~exists(arg(1)) then poppath='';when word(stateF(poppath),1)='FILE' then poppath=pathpart(poppath);otherwise;end;address KUANG popasl ID arg(2) CONTENT poppath;return 0;delext:;ids=arg(1);ccmd='sc_'arg(2);cscr='sc_'arg(3);address KUANG LIST ID ids;str=result;if str='empty'|str='' then return 0;parse var str cmd ',' scr;scr=strip(scr);if words(scr)>1 then scr=''scr'';address KUANG LIST ID ids POS List_GetEntry_Active STRING;z=getclip(cscr);call setclip(cscr,strip(delstr(z,pos(scr,z),length(scr)+1)));z=getclip(ccmd);call setclip(ccmd,strip(delword(z,find(z,cmd),1)));if z='' then address KUANG LIST ID ids STRING 'empty';return 0;fillelist:;cmd=getclip('sc_'arg(2));scr=getclip('sc_'arg(3));ids=arg(1);if cmd=''|scr='' then;do;LIST ID ids INSERT POS MUIV_List_Insert_Bottom STRING "empty";call setclip('sc_'arg(2));call setclip('sc_'arg(3));return 0;end;col1.='';col2.='';rc=readargs(cmd,'col1/M');rc=readargs(scr,'col2/M');if col1.count~=col2.count then;do;LIST ID ids INSERT POS MUIV_List_Insert_Bottom STRING "empty";call setclip('sc_'arg(2));call setclip('sc_'arg(3));request TITLE '"K¹¹ Error"' GADGETS '"OK" "Corrupt config found"';return 0;end;do i=0 to col1.count-1;LIST ID ids INSERT POS MUIV_List_Insert_Bottom STRING col1.i','col2.i;end;return 0;setfile:;if (~exists(arg(4)'/'strip(arg(1)))&~exists(arg(4)'/'strip(arg(1))'.amirx'))|pos('KUANG11',upper(strip(arg(1))))~=0 then;address KUANG arg(2) ID arg(3) CONTENT;return 0;fillist:;x=getclip('sc_'arg(1));if x='' then x='empty';ids=arg(2);do until x='';parse var x w x;LIST ID ids INSERT POS MUIV_List_Insert_Bottom STRING w;end;return 1;dellist:;ids=arg(1);address KUANG LIST ID ids;str=result;if str='empty'|str='' then return 0;address KUANG LIST ID ids POS List_GetEntry_Active STRING;x='sc_'arg(2);z=strip(getclip(x));z=delword(z,find(z,str),1);if z='' then address KUANG LIST ID ids INSERT POS 0 STRING 'empty';if ids='KCLST' then;do;address value(amirc);'SAY /KC DELK' str;address REXX;end;else call setclip(x,z);return 0;addlist:;y=upper(arg(2));if y='' then return 0;ids=arg(1);x='sc_'arg(3);z=getclip(x);if z='ALL' then;do;address KUANG LIST ID ids POS 0 STRING;z='';end;else if z='' then address KUANG LIST ID ids POS MUIV_List_Insert_Bottom STRING;address KUANG LIST ID ids INSERT POS MUIV_List_Insert_Bottom STRING y;z=strip(z y);if ids='KCLST' then;do;address value(amirc);'SAY /KC ADDK' y;address REXX;end;else call setclip(x,z);return 0;setc:;x=upper(arg(2));select;when x='1' then x='ON';when x='0' then x='OFF';when x='UNPROTECTED' then x='NONP';otherwise;end;call setclip('sc_'arg(1),x);return 0;about:;k11='\033c\033bKuang Eleven\n\033n Version \033b3.0\033n\n\n';k11=k11||'\033iThis is a MUIRexx 3.0 application\033n\n\n';k11=k11||'Author : Ariel Magnum\033n\nE-Mail: <amagnum@bigfoot.com>\n\n';k11=k11||'Special thanks to \033bFastFreddy^dC\033n\n\n\n';k11=k11||'Thanks everyone for supporting me.\nPlease read the documentation for more info.';address KUANG;request TITLE '"About Kuang¹¹"' GADGETS '"Ok!"' STRING k11;return;conv:;x=getclip('sc_'arg(1));if x='ON' then return 'ATTRS' Selected 1;return 'ATTRS' Selected 0;cyconv:;x=getclip('sc_'arg(1));Select;when x=''|x='OFF' then x=0;when x='ON' then x=1;when x='ALL' then x=1;when x='FRIENDS' then x=2;when x='ALLFRIENDS' then x=3;when x='NONP' then x=2;when x='PACKS' then x=2;when x='OPS' then x=3;when x='SHORT' then x=0;when x='LONG' then x=1;when x='TEXT' then x=1;when x='SOUND' then x=2;when x='BOTH' then x=3;otherwise;end;return 'ATTRS' MUIA_Cycle_Active x;error:;syntax:;if open(1,dbfile,'W') then;do;writeln(1,cmd);writeln(1,SIGL);writeln(1,rc);writeln(1,errortext(rc));end;call endprog('You have found a bug!\nNow Email author at amagnum@ibm.net\nAttach the file' dbfile 'to the message!');halt:;endprog:;if show('P','KUANGPORT') then call closeport('KUANGPORT');address KUANG;x=arg(1);if x~='' then;request TITLE '"Kuang¹¹ Error"' GADGETS '"Ok"' STRING x;quit;exit;load:;address value(amirc);'SAY /load';address REXX;call endprog();init:;if show('P','KUANGPORT') then call endprog("Already active!");if ~show('L','rexxdossupport.library') then if ~addlib('rexxdossupport.library',0,-30,2) then call endprog("Cannot load rexxsupport.library!");if ~show('L','rexxsupport.library') then if ~addlib('rexxsupport.library',0,-30,0) then call endprog("Cannot load rexxsupport.library!");if getclip('st_init')~=1 then call endprog("Kuang Eleven not initliaised!");l=show('P');p=pos('AMIRC.',l);if p=0 then call endprog("AmIRC not active!");amirc=substr(l,p,7);return 0;getdir:;l=showdir(arg(1),'F');el='';do until l='';parse var l file l;if upper(right(file,6))='.AMIRX' then el=el','file;end;return strip(el,'L',',')